uDig

«  Changing the projection of a shapefile   ::   Contents   ::   Using Advanced Edit Mode  »

Processing the Geometry in a Shapefile

You can use the Reshape operation to modify the geometry column and then export the resulting scratch layer.

Related concepts

Constraint Query Language

Related reference

Transform operation

Catalog view

Resource to Shapefile Wizard

Converting Polygons to Points using Centroid

  1. Select the contents of your shapefile

    • Exapand the shapefile entry in the catalog view and select the contents
    • Select the layer (if you happen to have the shape file on screen)
  2. Run the Transform operations, this operation will show you a the current attributes being generated, along with their type and an expression used to calculate values.

  3. Select the_geom in the Transform table

  4. Define the expression used to generate your geometry value:

    centroid(the_geom)

  5. Press OK. A new scratch entry containing the result of the operation has been added to the scratch service in the Catalog view.

  6. Right click on the above scratch entry in the catalog view and select Export to open the Export Wizard

  7. Choose Resource to Shapefile and press Next>

  8. Provide a destination directory for your new shapefile

  9. Ensure that your scratch entry is checked off for export

  10. Press Finish

  11. The new shapefile is now available in the Catalog view

You can define additional columns using any CQL expression, please be advised that the shapefile format can only support one geometry column.

Converting Lines or Points into Polygons using Buffer

  1. Select the contents of your shapefile

    • Exapand the shapefile entry in the catalog view and select the contents
    • Select the layer (if you happen to have the shape file on screen)
  2. Run the Transform operations, this operation will show you a the current attributes being generated, along with their type and an expression used to calculate values.

  3. Define the process desired for the the_geom expression:

    buffer(the_geom,0.01)
    
  4. Press OK. A new scratch entry containing the result of the operation has been added to the scratch service in the Catalog view.

  5. Right click on the above scratch entry in the catalog view and select Export to open the Export Wizard

  6. Choose Resource to Shapefile and press Next>

  7. Provide a destination directory for your new shapefile

  8. Ensure that your scratch entry is checked off for export

  9. Press Finish

  10. The new shapefile is now available in the Catalog view

You can define additional columns using any CQL expression, please be advised that the shapefile format can only support one geometry column.

«  Changing the projection of a shapefile   ::   Contents   ::   Using Advanced Edit Mode  »